<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BingMapsToolkit="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Common;component/Resources/CommonStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="BingMapsToolkit:LaunchPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="BingMapsToolkit:LaunchPanel">
                    <Canvas x:Name="PART_LayoutRoot" Opacity="0.82" Height="25">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PART_LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="OptionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.6000000"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LaunchFlyout" Storyboard.TargetProperty="(FrameworkElement.Height)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="100"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LaunchFlyout" Storyboard.TargetProperty="(Canvas.Top)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-98"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Closed">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Height="25" Width="{Binding Width, ElementName=PART_LayoutRoot, Mode=OneWay}" Background="#FF2B2B2B" BorderBrush="#FF000000" BorderThickness="1,1,1,1" Canvas.ZIndex="2"></Border>
                            <ContentPresenter
                                    Width="{Binding Width, ElementName=PART_LayoutRoot, Mode=OneWay}"
                                    Height="25"
                                    Canvas.ZIndex="3"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}" />
                        <Grid Height="16" Width="100" Canvas.Top="-16" Canvas.Left="15">
                            <Border Background="#FF2B2B2B" BorderBrush="#FF000000" BorderThickness="1,1,1,0" Canvas.ZIndex="0" CornerRadius="8,8,0,0">
                                <ContentControl HorizontalAlignment="Center" Foreground="White" IsTabStop="False" Content="{TemplateBinding Title}"/>
                            </Border>
                        </Grid>
                        <Grid Height="0" Width="{Binding Width, ElementName=PART_LayoutRoot, Mode=TwoWay}" x:Name="LaunchFlyout" Margin="0,0,0,25" HorizontalAlignment="Stretch" Canvas.ZIndex="1">
                            <Grid Margin="10,0,10,0">
                                <Border Margin="5,0,5,0" Background="#FF2B2B2B" BorderBrush="#FF000000" BorderThickness="1,1,1,1" VerticalAlignment="Stretch">
                                    <ScrollViewer Style="{StaticResource ScrollViewerStyle}" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
                                        <ContentPresenter Margin="8,8,8,8"
                                        Content="{TemplateBinding LaunchContent}"
                                        HorizontalAlignment="Center"
                                        ContentTemplate="{TemplateBinding LaunchContentTemplate}" />
                                    </ScrollViewer>
                                </Border>
                            </Grid>
                        </Grid>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

